const kshLargeScreenDataApi = {}

import http from '@/plugin/axios'
import {viewApi} from '@/config/env'

/**
 * @author ling.yuan@topevery.club
 * @date 2020/04/09 14:25:14
 * @Description: 获取大类数据
 */
kshLargeScreenDataApi.getCaseClassData = (obj) => {
  return http.$GET(`/${viewApi}/kshLargeScreenData/getCaseClassData/${obj}`)
}
/**
 * @author ling.yuan@topevery.club
 * @date 2020/04/09 14:25:22
 * @Description: 根据code获取小类
 */
kshLargeScreenDataApi.getCaseClassByCode = (code, query) => {
  return http.$GET(`/${viewApi}/kshLargeScreenData/getCaseClassByCode/${code}&${query}`)
}
/**
 * @author liu.ying@topevery.club
 * @date 2020/04/10 9:25:22
 * @Description: 根据code获取小类
 */
kshLargeScreenDataApi.getSmallClassByCode = (code) => {
  return http.$GET(`/${viewApi}/kshLargeScreenData/getSmallClassByCode/${code}`)
}
/**
 * @author ling.yuan@topevery.club
 * @date 2020/04/09 14:25:22
 * @Description: 获取现行和接入数据对比
 */
kshLargeScreenDataApi.getHisAndAccessContrast = () => {
  return http.$GET(`/${viewApi}/kshLargeScreenData/getHisAndAccessContrast`)
}
/**
 * @author liu.ying@topevery.club
 * @date 2020/04/11 9:25:22
 * @Description: 根据getPartData获取海量点
 */
kshLargeScreenDataApi.getPartData = (code, areaCode, areaName) => {
  return http.$GET(`/${viewApi}/kshLargeScreenData/getPartData1/${code}?areaCode=${areaCode}&areaName=${areaName}`)
}
/**
 * @author liu.ying@topevery.club
 * @date 2020/04/12 9:25:22
 * @Description: 查询管线数据
 */
kshLargeScreenDataApi.getLinePipeData = () => {
  return http.$GET(`/${viewApi}/kshLargeScreenData/getLinePipeData`)
}
/**
 * @author ling.yuan@topevery.club
 * @date 2020/04/13 13:57:02
 * @Description: 通过部件的code 大类 和 是否接入 查询详情
 */
kshLargeScreenDataApi.getHisAndAccessById = (code, keyCode, type) => {
  return http.$GET(`/${viewApi}/kshLargeScreenData/getHisAndAccessById/${keyCode}?code=${code}&type=${type}`)
}

/**
 * @author liu.ying@topevery.club
 * @date 2020/04/26 13:57:02
 * @Description: 积水点查询
 */
kshLargeScreenDataApi.getPondingPoint = () => {
  return http.$GET(`/${viewApi}/kshLargeScreenData/getPondingPoint`)
}
export default kshLargeScreenDataApi
